<%--
  Created by cofey on 16/11/20.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Portal管理-页面汇总</title>
</head>
<body>
<!-- 当前位置 -->
<div id="urHere">无线南山统一管理平台<b>></b><strong>Portal管理</strong><b>></b><strong>页面汇总</strong></div>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <div class="navList" style="margin-top: 20px;">
        <ul class="tab" style="margin-bottom: 20px;">
            <li><a href="${ctx}/portal/am">Portal管理</a></li>
            <li><a href="#" class="selected">页面汇总</a></li>
        </ul>
        <div class="filter">
            <table width="100%">
                <tr>
                    <td align="right" width="10%">区域:</td>
                    <td width="38%"><input name="filter_area" type="text" class="inpMain"/></td>
                    <td align="right" width="10%">热点名称:</td>
                    <td width="38%"><input name="filter_hotspot_name" type="text" class="inpMain"/></td>
                </tr>
                <tr>
                    <td align="right" width="10%">图片名称:</td>
                    <td width="38%"><input name="filter_name" type="text" class="inpMain"/></td>
                    <td align="right" width="10%">时间:</td>
                    <td width="38%">
                        <input name="filter_begin_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                               readonly="readonly"/> -
                        <input name="filter_end_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                               readonly="readonly"/>
                        <input name="submit" class="btnGray" type="button" value="筛选" onclick="config.loadContent();"/>
                    </td>
                </tr>
            </table>
        </div>
        <div id="list">
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <thead>
                <tr>
                    <th width="5%" align="center">序号</th>
                    <th width="10%" align="center">区域</th>
                    <th width="15%" align="center">热点名称</th>
                    <th width="8%" align="center">图片名称</th>
                    <th width="25%" align="center">介绍文字</th>
                    <th width="10%" align="center">存储路径</th>
                    <th width="10%" align="center">上传人</th>
                    <th width="10%" align="center">上传时间</th>
                </tr>
                </thead>
                <tbody></tbody>
            </table>
            <form name="selectForm" action="${ctx}/portal/content" method="post">
                <div class="g-pagebar"></div>
                <input type="hidden" name="hotspotName"/>
                <input type="hidden" name="area"/>
                <input type="hidden" name="name"/>
                <input type="hidden" name="uploadBeginTime"/>
                <input type="hidden" name="uploadEndTime"/>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    var config = null;
    jQuery(function ($) {
        var $container = $('.mainBox');
        var $filter = $container.find('.filter');
        var $pagebar = $container.find('.g-pagebar');
        var $tbodyContent = $container.find('table.tableBasic tbody');
        var $selectForm = $container.find("form[name=selectForm]");
        config = {
            pagebar: $pagebar,
            init: function () {
                config.loadContent();
            },
            loadContent: function () {
                config.setQueryWhere();

                $tbodyContent.empty();
                $pagebar.off();

                var optionsPost = {
                    success: function (data) {
                        $tbodyContent.html(data);
                    }
                };
                $selectForm.ajaxSubmit(optionsPost);
            },
            setQueryWhere: function () {
                var hotspotName = $filter.find("input[name=filter_hotspot_name]").val();
                var area = $filter.find("input[name=filter_area]").val();
                var name = $filter.find("input[name=filter_name]").val();
                var uploadBeginTime = $filter.find("input[name=filter_begin_time]").val();
                var uploadEndTime = $filter.find("input[name=filter_end_time]").val();

                $selectForm.find("input[name=hotspotName]").val(hotspotName);
                $selectForm.find("input[name=area]").val(area);
                $selectForm.find("input[name=name]").val(name);
                $selectForm.find("input[name=uploadBeginTime]").val(uploadBeginTime);
                $selectForm.find("input[name=uploadEndTime]").val(uploadEndTime);
            }
        }

        config.init();
    });
</script>
</body>
</html>
